{%extends "base.xhtml"%}
{% load i18n %}
{% load ham %}
{%block content%}
	<h2>{%trans "Submission"%}</h2>

	<table class="results">
	<thead>
	<tr class="goal"><td>{%trans "Tests"%}</td><td>{%trans "Status"%}</td><td>{%trans "Points"%}</td><td>{%trans "Max points"%}</td></tr>
	<tr class="test"><td>{%trans "Test name"%}</td><td>{%trans "Status"%}</td><td>{%trans "Time"%}</td><td>{%trans "Time limit"%}</td></tr>
	</thead>
	<tbody>
	{%for goal in goals%}
	<tr class="goal {%ifequal goal.status 0%}accepted{%else%}rejected{%endifequal%}">
		<td>V</td>
		<td>{{goal.status}}</td>
		<td>{{goal.points}}</td>
		<td>{{goal.maxPoints}}</td>
	</tr>
		{%for test in goal.tests%}
		<tr class="test {%ifequal test.status 0%}accepted{%else%}rejected{%endifequal%}">
			<td>{{test.name}}</td>
			<td>{{test.status}}:{{test.comment}}</td>
			<td>{{test.time}}</td>
			<td>{{test.maxTime}}</td>
		</tr>
		{%endfor%}
	{%endfor%}
	</tbody>
	</table>

{%endblock%}
